package com.ssy.lingxi.member.merchant.api.feign.paas;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.model.vo.paas.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;
import java.util.List;

/**
 * 会员设置 - 会员权益与等级设置
 * @author 万宁
 * @version 2.0.0
 * @date 2020-07-09
 */
@FeignClient(name = "merchant-member-service")
@RequestMapping("/paas/member/base")
public interface BaseLevelRightCreditControllerFeign {

    /**
     * 修改会员权益状态
     * @param configVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/right/update/status", method = RequestMethod.POST)
    Wrapper<Void> updateBaseRightStatus(@RequestBody @Valid BaseRightConfigStatusVO configVO);

    /**
     * 更改会员升级规则设置的状态
     * @param configVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/level/rule/update/status", method = RequestMethod.POST)
    Wrapper<Void> updateBaseLevelRuleConfigStatus(@RequestBody @Valid BaseLevelRuleStatusVO configVO);

    /**
     * 新增或修改会员等级（及关联的角色）
     * @param configVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/level/config/update/insert", method = RequestMethod.POST)
    Wrapper<Void> updateOrInsertBaseLevelConfig(@RequestBody @Valid BaseLevelConfigVO configVO);

    /**
     * 查询所有基础会员等级设置（V2待删除）
     * @return 基础等级设置列表
     */
    @RequestMapping(value = "/level/config/list", method = RequestMethod.GET)
    Wrapper<List<BaseLevelConfigVO>> listBaseLevelConfig();

    /**
     * 删除会员等级
     * @param deleteVO 接口参数
     * @return 更新结果
     */
    @RequestMapping(value = "/level/config/delete", method = RequestMethod.POST)
    Wrapper<Void> deleteBaseLevelConfig(BaseLevelConfigDeleteVO deleteVO);

    /**
     * 更新会员等级状态
     * @param updateVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/level/config/update/status", method = RequestMethod.POST)
    Wrapper<Void> updateBaseLevelConfigStatus(@RequestBody @Valid BaseLevelConfigStatusVO updateVO);

    /**
     * 设置会员等级关联的权益
     * @param rightsVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/level/config/right/add", method = RequestMethod.POST)
    Wrapper<Void> setBaseLevelConfigRelationBaseRights(@RequestBody @Valid BaseLevelConfigSetRightsVO rightsVO);


    /**
     * 更改会员信用评估规则权重
     * @param pointVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/credit/update/point", method = RequestMethod.POST)
    Wrapper<Void> updateMemberCreditConfigPoint(@RequestBody @Valid MemberCreditConfigVO pointVO);

    /**
     * 更改会员信用评估规则状态
     * @param pointVO 接口参数
     * @return 状态码
     */
    @RequestMapping(value = "/credit/update/status", method = RequestMethod.POST)
    Wrapper<Void> updateMemberCreditConfigStatus(@RequestBody @Valid MemberCreditConfigVO pointVO);
}
